# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.10.2)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/libs/armeabi-v7a")

add_library(
             #库名称
             native-lib
             #库类型 此处是so
             SHARED
             #待编译的cpp文件
        src/main/cpp/native-lib.cpp
)
find_library(
              #起别名
              log-lib
              #查找系统库
              log
)
find_library( jnigraphics-lib
              jnigraphics
)
target_link_libraries(
                       #将库关联 防止引用时找不到
                       native-lib
                       luban
                       ${log-lib}
                       ${jnigraphics-lib}
)